package EventException;

import java.io.Serializable;

/**
 * @author 事件分类信息表
 */
public class EventException implements Serializable {
    /**
     * 数据库主键, 主键, uuid
     */
    private String exceptionId;

    /**
     * 事件分类
     */
    private String eventSubType;

    /**
     * 事件类型
     */
    private String eventType;

    /**
     * 事件类型父类
     */
    private String eventTypeParent;

    private static final long serialVersionUID = 1L;

    public String getExceptionId() {
        return exceptionId;
    }

    public void setExceptionId(String exceptionId) {
        this.exceptionId = exceptionId;
    }

    public String getEventSubType() {
        return eventSubType;
    }

    public void setEventSubType(String eventSubType) {
        this.eventSubType = eventSubType;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getEventTypeParent() {
        return eventTypeParent;
    }

    public void setEventTypeParent(String eventTypeParent) {
        this.eventTypeParent = eventTypeParent;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EventException other = (EventException) that;
        return (this.getExceptionId() == null ? other.getExceptionId() == null : this.getExceptionId().equals(other.getExceptionId()))
                && (this.getEventSubType() == null ? other.getEventSubType() == null : this.getEventSubType().equals(other.getEventSubType()))
                && (this.getEventType() == null ? other.getEventType() == null : this.getEventType().equals(other.getEventType()))
                && (this.getEventTypeParent() == null ? other.getEventTypeParent() == null : this.getEventTypeParent().equals(other.getEventTypeParent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getExceptionId() == null) ? 0 : getExceptionId().hashCode());
        result = prime * result + ((getEventSubType() == null) ? 0 : getEventSubType().hashCode());
        result = prime * result + ((getEventType() == null) ? 0 : getEventType().hashCode());
        result = prime * result + ((getEventTypeParent() == null) ? 0 : getEventTypeParent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", exceptionId=").append(exceptionId);
        sb.append(", eventSubType=").append(eventSubType);
        sb.append(", eventType=").append(eventType);
        sb.append(", eventTypeParent=").append(eventTypeParent);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}